# TODO: Figure out how to detect platform correctly
PLATFORM=$(shell ruby -e "puts RUBY_PLATFORM")
ifeq ($(PLATFORM),i686-linux)
  MOZ_SRC=../../mozilla/obj-i686-pc-linux-gnu/dist
else
  MOZ_SRC=./../../gecko_sdk_osx
endif

XPIDL=$(MOZ_SRC)/bin/xpidl
XPIDL_INC=$(MOZ_SRC)/idl
FLAGS=-m typelib -w -v -I $(XPIDL_INC) -o

all: logger timer client

timer:
	$(XPIDL) $(FLAGS) pcPageTimer pcIPageTimer.idl

logger:
	$(XPIDL) $(FLAGS) pcLogger pcILogger.idl

client:
	$(XPIDL) $(FLAGS) pcClient pcIClient.idl

clean:
	rm -rf *.xpt

